#include "utils.h"
#include "leetcode.h"
int main()
{
    const char *inputImagePath = "../resources/test_1920x1080.UYVY";
    int srcImageSize = 1920 * 1080 * 2;
    char *srcData = (char *)malloc(srcImageSize);
    LoadImg(inputImagePath, srcData, srcImageSize);

    int n = mySqrt(2147395600);
    LOG_D("%d", n);

    int returnSize = 0;
    int *res = getRow(3, &returnSize);
    for (int i = 0; i < returnSize; i++)
    {
        LOG_D("%d", res[i]);
    }

    // int digits[] = {4, 3, 2, 1};
    // int returnSize = 0;
    // int *res = plusOne(digits, 4, &returnSize);

    // int res = strStr(haystack, needle);

    // drawUYVYRectangle(srcData, 1920, 1080, 100, 200, 100, 200);
    // saveYUV(srcData, 1920, 1080, UYVY);

    // int dstImageSize = 1920 * 1080 * 3 / 2;
    // char *dstData = (char *)malloc(dstImageSize);
    // convertUYVYtoNV12(srcData, dstData, 1920, 1080);
    // drawNV12Rectangle(dstData,1920,1080,100,400,100,400);
    // saveYUV(dstData, 1920, 1080, NV12);

    //  ***************************************************************** merge4UYVYTo1UYVY *****************************************************************
    //  char *srcData2 = (char *)malloc(srcImageSize);
    //  LoadImg(inputImagePath, srcData2, srcImageSize);
    //  char *srcData3 = (char *)malloc(srcImageSize);
    //  LoadImg(inputImagePath, srcData3, srcImageSize);
    //  char *srcData4 = (char *)malloc(srcImageSize);
    //  LoadImg(inputImagePath, srcData4, srcImageSize);
    //  char *dstData = (char *)malloc(srcImageSize * 4);
    //  LoadImg(inputImagePath, dstData, srcImageSize * 4);
    //  merge4UYVYTo1UYVY(srcData, srcData2, srcData3, srcData4, dstData, 1920, 1080);
    //  saveYUV(dstData, 1920 * 2, 1080 * 2, UYVY);

    // testPthread();

    // char str[100];
    // fgets(str, sizeof(str), stdin);

    // free(srcData);
    // srcData = nullp,0r;
    return 0;
};